# docker部署脚本

# 项目名, 容器名, 镜像名, 宿主机端口, 容器映射端口, git分支名
#dirname=bd2102_myblog
#container_name=bd2102_myblog
#image_name=bd2102_myblog
#port_host=2102
#port_container=80
#origin_branch=master

# --- 配置变量
 source config.sh

# 防止端口被占用
sh shells/killport.sh $port_container

# pull服务端版本
git pull origin $origin_branch

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# 运行
python manage.py runserver 0.0.0.0:$port_container